#include  <stdio.h>
#define  N   100
int fun(int a[ ], int n)
{   int b[N], c[N]={0};
    int cc = 0;
	int i, j, min;
    for(i=0; i<n; i++)
/******************found*******************/
    {   for(j=0;j<cc; j++) 
           if (a[i] == b[j])
				break;
/******************found*******************/
	    if (j>cc)
		{	b[cc] = a[i];
			c[cc] = 1;
		    cc++;
		}
		else
			c[j]++;
	}
	min = 0;
	for(i=1; i<cc; i++)
	    if (c[i] < c[min])
			min = i;
/******************found*******************/
	return   b[min];
}
main( )
{   int a[N] ={5, 3, 3, 3, 2, 2};
	int min_lone;
	min_lone = fun(a, 6);
	printf("min_lone=%d\n", min_lone);
}
